CommonEvent 8
Name = "Medal Queen"

  999([8])
  ControlVariables([10, 10, 0, 3, 0, 32, 0])
  ConditionalBranch([1, 10, 0, 0, 0])
    ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
    ShowText(["\\n<Medal Queen>You don't currently possess any small medals.\nHere is the list of items you can exchange any medals you find for."])
    ShowText([""])
    ShowText([""])
    Empty([])

  Else([])
    ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
    ShowText(["\\n<Medal Queen>You currently possess \\V[10] small medals.\nWhich treasure would you like to exchange them for?"])
    ShowText([""])
    ShowText([""])
    Empty([])

  BranchEnd([])
  Label(["リスト"])
  ControlVariables([10, 10, 0, 3, 0, 32, 0])
  Script(["unlimited_choices(11,[\"Noble's Family Tree (3)\","])
  ScriptMore(["\"Falcon Sword (5)\",\"Magic Cape (8)\","])
  ScriptMore(["\"Magical Shield (10)\","])
  ScriptMore(["\"Rainbow Dress (20)\","])
  ScriptMore(["\"King's Proof (30)\",\"Caladbolg (40)\","])
  ScriptMore(["\"Recruit Medal Queen (45)\","])
  ScriptMore(["\"Archangel Bra (50)\",\"Never mind\"])"])
  ConditionalBranch([1, 11, 0, 0, 0])
    ConditionalBranch([8, 619])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>I believe you have already purchased a \\ii[619].\nAre there any other items you wish to purchase?"])
      ShowText([""])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    Else([])
      ConditionalBranch([1, 10, 0, 3, 1])
        ChangeItems([32, 1, 0, 3])
        ControlVariables([55, 55, 1, 0, 3])
        ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
        ShowText(["\\n<Medal Queen>It's a deal. Here you go.\nYou can now change your job to Noble."])
        ShowText([""])
        ShowText([""])
        PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
        ChangeItems([619, 0, 0, 1])
        ChangeArmor([259, 0, 0, 1, false])
        ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
        ShowText(["\\n<Medal Queen>Are there any other items you wish to purchase?"])
        ShowText([""])
        JumpToLabel(["リスト"])
        Empty([])

      Else([])
        ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
        ShowText(["\\n<Medal Queen>I'm sorry, but you do not appear to have enough medals for that item."])
        ShowText([""])
        JumpToLabel(["リスト"])
        Empty([])

      BranchEnd([])
      Empty([])

    BranchEnd([])
    Empty([])

  BranchEnd([])
  ConditionalBranch([1, 11, 0, 1, 0])
    ConditionalBranch([1, 10, 0, 5, 1])
      ChangeItems([32, 1, 0, 5])
      ControlVariables([55, 55, 1, 0, 5])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>It's a deal. Here you go."])
      ShowText([""])
      PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
      ChangeWeapons([54, 0, 0, 1, false])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>Are there any other items you wish to purchase?"])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    Else([])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>I'm sorry, but you do not appear to have enough medals for that item."])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    BranchEnd([])
    Empty([])

  BranchEnd([])
  ConditionalBranch([1, 11, 0, 2, 0])
    ConditionalBranch([1, 10, 0, 8, 1])
      ChangeItems([32, 1, 0, 8])
      ControlVariables([55, 55, 1, 0, 8])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>It's a deal. Here you go."])
      ShowText([""])
      PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
      ChangeArmor([10, 0, 0, 1, false])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>Are there any other items you wish to purchase?"])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    Else([])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>I'm sorry, but you do not appear to have enough medals for that item."])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    BranchEnd([])
    Empty([])

  BranchEnd([])
  ConditionalBranch([1, 11, 0, 3, 0])
    ConditionalBranch([1, 10, 0, 10, 1])
      ChangeItems([32, 1, 0, 10])
      ControlVariables([55, 55, 1, 0, 10])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>It's a deal. Here you go."])
      ShowText([""])
      PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
      ChangeArmor([277, 0, 0, 1, false])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>Are there any other items you wish to purchase?"])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    Else([])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>I'm sorry, but you do not appear to have enough medals for that item."])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    BranchEnd([])
    Empty([])

  BranchEnd([])
  ConditionalBranch([1, 11, 0, 4, 0])
    ConditionalBranch([1, 10, 0, 20, 1])
      ChangeItems([32, 1, 0, 20])
      ControlVariables([55, 55, 1, 0, 20])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>It's a deal. Here you go."])
      ShowText([""])
      PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
      ChangeArmor([156, 0, 0, 1, false])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>Are there any other items you wish to purchase?"])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    Else([])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>I'm sorry, but you do not appear to have enough medals for that item."])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    BranchEnd([])
    Empty([])

  BranchEnd([])
  ConditionalBranch([1, 11, 0, 5, 0])
    ConditionalBranch([8, 620])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>I believe you have already purchased the \\ii[620].\nAre there any other items you wish to purchase?"])
      ShowText([""])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    Else([])
      ConditionalBranch([1, 10, 0, 30, 1])
        ChangeItems([32, 1, 0, 30])
        ControlVariables([55, 55, 1, 0, 30])
        ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
        ShowText(["\\n<Medal Queen>It's a deal. Here you go.\nYou can now change your job to King."])
        ShowText([""])
        ShowText([""])
        ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
        ShowText(["\\n<Medal Queen>Keep in mind that mastering Warrior and Noble are prerequisites to being a King."])
        ShowText([""])
        ShowText([""])
        PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
        ChangeItems([620, 0, 0, 1])
        ChangeArmor([269, 0, 0, 1, false])
        ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
        ShowText(["\\n<Medal Queen>Are there any other items you wish to purchase?"])
        ShowText([""])
        JumpToLabel(["リスト"])
        Empty([])

      Else([])
        ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
        ShowText(["\\n<Medal Queen>I'm sorry, but you do not appear to have enough medals for that item."])
        ShowText([""])
        JumpToLabel(["リスト"])
        Empty([])

      BranchEnd([])
      Empty([])

    BranchEnd([])
    Empty([])

  BranchEnd([])
  ConditionalBranch([1, 11, 0, 6, 0])
    ConditionalBranch([1, 10, 0, 40, 1])
      ChangeItems([32, 1, 0, 40])
      ControlVariables([55, 55, 1, 0, 40])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>It's a deal. Here you go."])
      ShowText([""])
      PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
      ChangeWeapons([182, 0, 0, 1, false])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>Are there any other items you wish to purchase?"])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    Else([])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>I'm sorry, but you do not appear to have enough medals for that item."])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    BranchEnd([])
    Empty([])

  BranchEnd([])
  ConditionalBranch([1, 11, 0, 7, 0])
    ConditionalBranch([1, 1143, 0, 20, 1])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>This item is currently not available.\nPlease try to understand..."])
      ShowText([""])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    BranchEnd([])
    ConditionalBranch([0, 1533, 1])
      ConditionalBranch([1, 10, 0, 45, 1])
        ConditionalBranch([1, 10, 0, 19, 2])
          ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
          ShowText(["\\n<Medal Queen>You are not yet strong enough for me to join. Please reach level 20 first."])
          ShowText([""])
          ShowText([""])
          JumpToLabel(["リスト"])
          Empty([])

        Else([])
          ChangeItems([32, 1, 0, 45])
          ControlVariables([55, 55, 1, 0, 45])
          ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
          ShowText(["\\n<Medal Queen>You want me to join your party?\nI suppose if you have the medals, I have to honor the deal..."])
          ShowText([""])
          ShowText([""])
          ControlVariables([11, 11, 0, 4, "$game_actors[1].base_level"])
          ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
          ShowText(["\\n<Medal Queen>If you want to exchange medals in the future, remove me from the party and I'll be waiting here in this castle for you."])
          ShowText([""])
          ShowText([""])
          SetMoveRoute([0, "RPG::MoveRoute(@repeat=false, @skippable=false, @wait=true, @list=[\"RPG::MoveCommand(@code=37, @parameters=[])\", \"RPG::MoveCommand(@code=10, @parameters=[])\", \"RPG::MoveCommand(@code=39, @parameters=[])\", \"RPG::MoveCommand(@code=0, @parameters=[])\"])"])
          Unnamed(["RPG::MoveCommand(@code=37, @parameters=[])"])
          Unnamed(["RPG::MoveCommand(@code=10, @parameters=[])"])
          Unnamed(["RPG::MoveCommand(@code=39, @parameters=[])"])
          Script(["add_actor_ex(533)"])
          PlayME(["RPG::ME(@name=\"fanfale\", @pitch=100, @volume=100)"])
          ShowTextAttributes(["", 0, 0, 2])
          ShowText(["The Queen of Grand Noah has joined the party!"])
          Wait([60])
          Empty([])

        BranchEnd([])
        Empty([])

      Else([])
        ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
        ShowText(["\\n<Medal Queen>I'm sorry, but you do not appear to have enough medals for that item."])
        ShowText([""])
        JumpToLabel(["リスト"])
        Empty([])

      BranchEnd([])
      Empty([])

    Else([])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>I am already your companion.\nAre there any other items you wish to purchase?"])
      ShowText([""])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    BranchEnd([])
    Empty([])

  BranchEnd([])
  ConditionalBranch([1, 11, 0, 8, 0])
    ConditionalBranch([1, 10, 0, 50, 1])
      ChangeItems([32, 1, 0, 50])
      ControlVariables([55, 55, 1, 0, 50])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>It's a deal. Here you go."])
      ShowText([""])
      PlaySE(["RPG::SE(@name=\"Item1\", @pitch=100, @volume=80)"])
      ChangeArmor([174, 0, 0, 1, false])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>Are there any other items you wish to purchase?"])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    Else([])
      ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
      ShowText(["\\n<Medal Queen>I'm sorry, but you do not appear to have enough medals for that item."])
      ShowText([""])
      JumpToLabel(["リスト"])
      Empty([])

    BranchEnd([])
    Empty([])

  BranchEnd([])
  ShowTextAttributes(["grandnoa_fc1", 3, 0, 2])
  ShowText(["\\n<Medal Queen>Please collect more medals and return. I look forward to seeing you again."])
  ShowText([""])
  ShowText([""])
  ConditionalBranch([1, 55, 0, 3, 1])
    Script(["gain_medal(1401)"])
    Empty([])

  BranchEnd([])
  ConditionalBranch([1, 55, 0, 15, 1])
    Script(["gain_medal(1402)"])
    Empty([])

  BranchEnd([])
  ConditionalBranch([1, 55, 0, 50, 1])
    Script(["gain_medal(1403)"])
    Empty([])

  BranchEnd([])
  ConditionalBranch([1, 55, 0, 250, 1])
    Script(["gain_medal(1404)"])
    Empty([])

  BranchEnd([])
  ErasePicture([5])
  ExitEventProcessing([])
  Empty([])
